FROM python:3.8
WORKDIR /code
RUN mkdir ./logs
COPY scrapyd.conf /etc/scrapyd/
COPY requirements.txt .
EXPOSE 6800
RUN pip3 install --upgrade pip -i https://pypi.tuna.tsinghua.edu.cn/simple
RUN pip3 install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple
# 默认的logs位置是在 /root/logs; RUN mkdir /root/logs
CMD logparser -dir ./logs & scrapyd
